package com.itheima.web.controller;

import com.itheima.domain.Banner;
import com.itheima.service.BannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@RestController
@RequestMapping("/index")
public class IndexController {
    @Autowired
    private BannerService bannerService;
    //查找所有轮播图
    @GetMapping("/findBannerList")
    public List<Banner> findBannerList(){
        return bannerService.findBannerList();
    }
}
